package cn.shanks.dubbo.provider01.service.impl;

import cn.shanks.common.entity.Order;
import cn.shanks.common.service.OrderService;
import cn.shanks.dubbo.provider01.mapper.OrderMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@DubboService
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    @Transactional
    public boolean addOrder(Order order) {
        orderMapper.insert(order);
        return true;
    }
}
